package com.teach.shape4;

import java.util.Scanner;

/**
 * 圆形
 * @author J.L.Zhou
 *	jlzhou.top 版权所有
 */
public class Roundness extends Ellipse {
	
	public Roundness(){
		super.name = "圆形";
	}

	public void input(Scanner sc) {
		System.out.println("输入"+name+"的半径: ");
		float r = sc.nextFloat();
		setA(r);
		setB(r);
	}
	

	@Override
	public String getInputInfo() {
		return String.format("半径：%.2f",getA());
	}
	
	public static void main(String[] args) {
		Roundness roundness = new Roundness();
		roundness.init();
		roundness.show();
	}

}
